package com.example.moonshine.redchange.Fragment;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;


import com.example.moonshine.redchange.Activity.temchangeoneActivity;
import com.example.moonshine.redchange.Activity.temchangetwoActivity;
import com.example.moonshine.redchange.R;

/**
 * Created by moonshine on 2018/3/10.
 */

public class SecondListFragment extends Fragment {

    TextView temone;
    TextView temtwo;
    View view;
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        view = inflater.inflate(R.layout.change2, container, false);
        init();
        temone.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
//                Intent intent = new Intent();
//                intent.setClass(getActivity(), temchangeoneActivity.class);
//                startActivity(intent);
                Toast.makeText(getContext(),"该功能还未开放",Toast.LENGTH_SHORT).show();
            }
        });
        temtwo.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
//                Intent intent = new Intent();
//                intent.setClass(getActivity(), temchangetwoActivity.class);
//                startActivity(intent);
                Toast.makeText(getContext(),"该功能还未开放",Toast.LENGTH_SHORT).show();

            }
        });
//        RelativeLayout relativeLayout = view.findViewById(R.id.changetwo);
//        relativeLayout.setOnClickListener(new View.OnClickListener() {
//            @Override
//            public void onClick(View v) {
//
//            }
//        });
        return  view;
    }

    public void init(){

        temone = view.findViewById(R.id.temone);
        temtwo = view.findViewById(R.id.temtwo);
    }

}
